package com.cskaoyan.controller;

import com.cskaoyan.bean.CskaoyanmallRegion;
import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.bean.vo.Region;
import com.cskaoyan.service.ZbRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/wx/region")
public class WxRegionController {
    @Autowired
    ZbRegionService zbRegionService;

    @GetMapping("/list")
    public Object list(Integer pid){
        List<CskaoyanmallRegion> regions = zbRegionService.queryRegionByPid(pid);
        return BaseRespVo.success(regions);
    }

}
